home *** CD-ROM | disk | FTP | other *** search
- #if 0
- /****************************************************************************************
-
-
- DeleteEvents.c
-
-
- ©1994 Specular International Ltd.
-
- Revision History
-
- when who what & why
- ========== ========== ======================================================
- 3/1/94 paul new today
-
- *****************************************************************************************/
- #endif
-
- #include <SetUpA4.h> /** Generates code; should be first. **/
-
- #include <stddef.h>
- #include <Memory.h>
- #include "IASInterface.h"
-
-
- /** Internally used routines. **/
- unsigned long manipulate_events(IASObjectInfoPtr object_info);
-
-
-
- /**
- ** main()
- **
- ** Entry point for the plug-in animation assistant.
- **
- ** This is called first with the <kIAS_SetupStorage> message.
- ** The <storage> param should be used to pass this info back.
- ** The plugin must not depend on any global variables being valid
- ** across calls. The contents of the <storage> must be a monolithic
- ** application heap Handle.
- **
- ** It is then called with the <kIAS_GetParams> message,
- ** which will allow the assistant to put up a dialog box asking
- ** the user for parameters.
- **
- ** It is then called with the <kIAS_ManipulateEvents> message
- ** with the info of the objects and their selected events in the <param> field.
- ** It may be called repeatedly if there are a ton of events selected.
- **
- ** Finally, it is called with the <kIAS_CleanUpStorage> message.
- **
- ** The <param> field will be NULL for all but the kIAS_ManipulateEvents
- ** messages.
- **/
-
- unsigned long main(long message, void *param, Handle *storage) {
-
- unsigned long err;
-
-
- /**
- ** In case we use globals, set up A4 to refer to them.
- **/
-
- RememberA0();
- SetUpA4();
-
- err = 0;
- switch(message)
- {
- case kIAS_SetupStorage:
- break; /** No storage to set up. **/
-
- case kIAS_GetParams:
- break; /** No params to get. **/
-
- case kIAS_ManipulateEvents:
- err = manipulate_events((IASObjectInfoPtr) param);
- break;
-
- case kIAS_CleanUpStorage:
- break; /** Nothing to clean up. **/
- }
-
- RestoreA4();
- return(err);
-
- } /** End of main(). **/
-
-
-
-
- /**
- ** manipulate_events()
- **
- ** Deletes the selected events.
- **/
-
- unsigned long manipulate_events(IASObjectInfoPtr object_info)
- {
- while(object_info != NULL)
- {
- IASEventPtr event;
-
-
- event = object_info->selected_events;
- while(event != NULL)
- {
- /**
- ** Set the time to -1 to indicate that we wish to delete
- ** this event.
- **/
-
- event->time = -1;
- event = event->next;
- }
- object_info = object_info->next;
- }
-
- return(0);
-
- } /** End of manipulate_events(). **/
-
-